package com.zishi.venuesbooking.ac;

import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.zishi.venuesbooking.BaseActivity;
import com.zishi.venuesbooking.R;

import org.json.JSONException;

import java.io.IOException;

public class MainActivity extends BaseActivity {

    Button mReserveBtn;
    Button mFriendsBtn;
    TextView mMyName;
    @Override
    protected int initLayout() {
        return R.layout.activity_main;
    }

    @Override
    protected void initView() {
        mMyName = findViewById(R.id.tv_my_name);
        mReserveBtn = findViewById(R.id.btn_reserve);
        mFriendsBtn = findViewById(R.id.btn_friend);
    }

    @Override
    protected void initData() throws JSONException, IOException {
        initListener();
    }

    protected void initListener() {
        mReserveBtn.setOnClickListener(v -> {
            navigateToWithSlowAnimation(ReserveActivity.class);
        });
        mFriendsBtn.setOnClickListener(v -> {
            navigateToWithSlowAnimation(MyFriendsActivity.class);
        });
        mMyName.setOnClickListener(v -> {
            navigateToWithSlowAnimation(MyActivity.class);
        });
    }
}